<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Eber的导航</title>
    <style>
        html,
        body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }

        #content {
            position: relative;
            top: 30%;
            text-align: center;
        }

        #div1,
        form{
            margin: 10px 0;
        }


    </style>
</head>

<body>

    <div id="content">
        <div id="div1"></div>
        <div id="search">
            <input type="text" name="word" />
            <input class="button" type="submit" value="百度" />
            </form>
            <form id="from_google" style="display:block" action="http://www.google.com/search" target="_blank"
                method="get">
                <input type="text" name="q" />
                <input class="button" type="submit" value="谷歌" />
            </form>
            <button id="tianJia">+</button>

        </div>
    </div>
    <script>
        window.location.href="https://www.bilibili.com/";

        var xhr = new XMLHttpRequest();
        xhr.open('GET', 'https://tianqiapi.com/api?version=v1&appid=95799884&appsecret=f734F06D', true);
        xhr.send();

        xhr.onreadystatechange = function () {
            var tq = JSON.parse(this.responseText)
            document.getElementById('div1').innerHTML = tq.city + tq.data[1].day + tq.data[1].wea;
        }
    </script>
</body>

</html>